/**
 * @ Author:Yoann Meclot. MSay2
 * @ Created on:2020-08-28 12:21:31
 * @ Modified on: 2021-06-17 17:14:31
 *
 * @version 1.4
 */
/**
 * Copyright (c) 2020-2021 MSay2 (Yoann Meclot) - @msay2/tspoet
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { CodeBlock } from "./CodeBlock.js";
import { Modifier } from "./Modifier.js";
import { ObjectName } from "./ObjectName.js";
import { TSAnnotation } from "./TSAnnotation.js";
/**
 * TSMethod object allows you to write a method.
 *
 * @class `TSMethod`
 * @version 1.3
 */
export declare class TSMethod
{
    /**
     * Build constructor method.
     *
     * @type {TSMethod.Builder}
     * @since 1.0
     */
    public static constructorBuilder():TSMethod.Builder;

    /**
     * Build method.
     *
     * @param name The name of the method.
     * @throws {TSPoetException} Check if the name is undefined or null.
     * @type {TSMethod.Builder}
     * @since 1.0
     */
    public static methodBuilder(name:string):TSMethod.Builder;

    public static Builder:{
        new (name:string):{
            /**
             * Add a documentation.
             *
             * @param arg Your documentation.
             * @throws {TSPoetException} Check if the arg is undefined or null.
             * @type {TSMethod.Builder}
             * @since 1.2
             */
            addDoc(arg:string):TSMethod.Builder;

            /**
             * Add a annotation for the method.
             *
             * @param tsAnnotation The annotation to be added.
             * @throws {TSPoetException} If you is on contructor builder.
             * @throws {TSPoetException} Check if the annotation is undefined or null.
             * @type {TSMethod.Builder}
             * @since 1.0
             */
            addAnnotation(tsAnnotation:TSAnnotation):TSMethod.Builder;

            /**
             * Add modifiers.
             *
             * @param modifiers The modifiers to be added.
             * @throws {TSPoetException} Check if the modifiers is undefined or null.
             * @throws {TSPoetException} If the modifiers contain the static, export, abstract modifiers for the constructor.
             * @type {TSMethod.Builder}
             * @since 1.0
             */
            addModifiers(...modifiers:Modifier[]):TSMethod.Builder;

            /**
             * Add parameter.
             *
             * @param name The name parameter.
             * @param objectName The parameter type.
             * @throws {TSPoetException} Check if the ObjectName object is undefined or null.
             * @throws {TSPoetException} Check if the name is undefined or null.
             * @type {TSMethod.Builder}
             * @since 1.0
             */
            addParameter(name:string, objectName:ObjectName):TSMethod.Builder;

            /**
             * Add statement.
             *
             * @param arg Your code line to be added.
             * @throws {TSPoetException} Check if the arg is undefined or null.
             * @type {TSMethod.Builder}
             * @since 1.0
             */
            addStatement(arg:string):TSMethod.Builder;

            /**
             * Add code block.
             *
             * @param codeBlock Your code block to be added.
             * @throws {TSPoetException} Check if the code block is undefined or null.
             * @type {TSMethod.Builder}
             * @since 1.0
             */
            addCodeBlock(codeBlock:CodeBlock):TSMethod.Builder;

            /**
             * Type cast the method.
             *
             * @param genericsNames The generics names.
             * @throws {TSPoetException} If you attempt cast the constructor.
             * @throws {TSPoetException} Check if the generics names is undefined or null.
             * @type {TSMethod.Builder}
             * @since 1.0
             */
            cast(...genericsNames:string[]):TSMethod.Builder;

            /**
             * Set return type to method.
             *
             * @param objectName The return type.
             * @throws {TSPoetException} If you attempt to apply a return value to constructor.
             * @throws {TSPoetException} Check if the ObjectName object is undefined or null.
             * @type {TSMethod.Builder}
             * @since 1.0
             */
            return(objectName:ObjectName):TSMethod.Builder;

            /**
             * Build a method.
             * @throws {TSPoetException} Check if the return type is undefined or null.
             * @type {TSMethod}
             * @since 1.0
             */
            build():TSMethod;
        };
    };
    
    private constructor(builder:TSMethod.Builder);
}
export declare namespace TSMethod
{
    type Builder = InstanceType<typeof TSMethod.Builder>;
}
//# sourceMappingURL=TSMethod.d.ts.map